#include <string.h>
#include "stat.h"

int stat_init(struct cache_stat *stat)
{
	memset(stat, 0, sizeof(*stat));
	return pthread_mutex_init(&stat->lock, 0) == 0 ? 1 : -1;
}

void stat_lock(struct cache_stat *stat)
{
	pthread_mutex_lock(&stat->lock);
}

void stat_unlock(struct cache_stat *stat)
{
	pthread_mutex_unlock(&stat->lock);
}

